<template>
	<view class="share-page-box">
    <view  class="backs" @click="goback()" >
      <u-icon  name="arrow-left" color="#fff" size="40"></u-icon>
    </view>
		<image src="https://duomi.bigchun.com/imgs/shareinfo.png" mode="widthFix" style="width: 100%;"></image>
    <view class="qy-sm-box">
      <view class="qy-title">权益说明</view>
      <view class="qy-content">
        <u-parse :html="textContent"></u-parse>
      </view>
    </view>
		<button class="share-btn" open-type="share">立即邀请</button>
	</view>

</template>

<script>
	import ShareMixin from '../../shopro/mixins/index.js'
	export default {
    data() {
      return {
        textContent: '',
      }
    },
    created(){
		  this.initTextInfo()
    },
    methods:{
      initTextInfo() {
        this.$https('vip.getXieInfo', {
          type: 1,
        }).then(res => {
          if (res.code) {
            this.textContent = res.data
          }
        })
      },
      goback(){
        console.log("====this.$Router.query&&!this.$Router.query.userBindId:",this.$Router.query&&!this.$Router.query.userBindId)
        if(this.$Router.query&&this.$Router.query.userBindId){
          uni.switchTab({
            url: '/pages/index/index'
          })
        }else{
          uni.navigateBack({
            delta:1
          })
        }
      }
    },
    onShareAppMessage() {
      let userBindId = uni.getStorageSync('userInfo').id
      let path = `pages/index/index?userBindId=${userBindId}`
      console.log("===========path",path)
      return {
        path,
        imageUrl: 'https://duomi.bigchun.com/imgs/vip/shareBg.jpg',
        title: '多米商城'
      }
    },
	}
</script>

<style lang="scss" scoped>
.share-page-box {
	width: 100vw;
	height: 100vh;
  position: relative;
	background-color: #2A2A2A;
	.share-btn {
		width: 568rpx;
		height: 88rpx;
		background: linear-gradient(180deg, #FFDB8F 0%, #FFC851 100%);
		border-radius: 16rpx;
		margin: 60rpx auto;
		font-size: 32rpx;
		color: #792E22;
		font-weight: bold;
		text-align: center;
		line-height: 88rpx;
	}
}
.backs{
  position:absolute;
  top: 60px;
  left: 60rpx;
  z-index: 200;
}
.qy-sm-box {
  width: 702rpx;
  margin: 0 auto;
  background: linear-gradient(90deg, #F0D8A5 0%, #DDB06C 100%);
  border-radius: 8px 8px 8px 8px;
  padding: 24rpx 0;
  .qy-title {
    font-size: 28rpx;
    color: #333333;
    font-weight: bold;
    margin-bottom: 30rpx;
    padding: 0 20rpx;
  }
  .qy-content {
    width: 94%;
    min-height: 372rpx;
    background-color: white;
    border-radius: 16rpx;
    padding: 28rpx 24rpx;
    box-sizing: border-box;
    margin: 0 auto;
  }
}
</style>
